/* 全局样式 */
:root {
    --primary-color: #4a6bff;
    --secondary-color: #ff6b6b;
    --background-color: #f8f9fa;
    --card-color: #ffffff;
    --text-color: #333333;
    --border-radius: 12px;
    --transition-speed: 0.3s;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 50px;
    animation: fadeIn 1s ease-in-out;
}

header h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    color: var(--primary-color);
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.2rem;
    color: #666;
}

/* 工具网格布局 */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

/* 工具卡片样式 */
.tool-card {
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.tool-card:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.tool-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #f1f3ff, #e6eaff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.8rem;
    transition: transform var(--transition-speed);
}

.tool-card:hover .tool-icon {
    transform: scale(1.1);
}

.tool-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
}

.tool-card p {
    color: #666;
    margin-bottom: 25px;
}

.tool-link {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 500;
    transition: all var(--transition-speed);
    box-shadow: 0 4px 12px rgba(74, 107, 255, 0.2);
}

.tool-link:hover {
    background-color: #3a5aee;
    box-shadow: 0 6px 15px rgba(74, 107, 255, 0.3);
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 30px 0;
    color: #777;
    border-top: 1px solid #eee;
}

/* 响应式调整 */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.2rem;
    }
    
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .container {
        padding: 20px 15px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .tool-card {
        padding: 20px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-card {
    animation: cardAppear 0.5s ease-out;
    animation-fill-mode: both;
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 为卡片添加延迟动画 */
.tool-card:nth-child(1) { animation-delay: 0.1s; }
.tool-card:nth-child(2) { animation-delay: 0.15s; }
.tool-card:nth-child(3) { animation-delay: 0.2s; }
.tool-card:nth-child(4) { animation-delay: 0.25s; }
.tool-card:nth-child(5) { animation-delay: 0.3s; }
.tool-card:nth-child(6) { animation-delay: 0.35s; }
.tool-card:nth-child(7) { animation-delay: 0.4s; }
.tool-card:nth-child(8) { animation-delay: 0.45s; }
.tool-card:nth-child(9) { animation-delay: 0.5s; }
.tool-card:nth-child(10) { animation-delay: 0.55s; }
.tool-card:nth-child(11) { animation-delay: 0.6s; }
.tool-card:nth-child(12) { animation-delay: 0.65s; }
.tool-card:nth-child(13) { animation-delay: 0.7s; }
.tool-card:nth-child(14) { animation-delay: 0.75s; }
.tool-card:nth-child(15) { animation-delay: 0.8s; } 